examples/fake-signing: Make runnable on Linux #26
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The main reason for fake signing is making it run on Linux - and not depend on
dxil.dll
on Windows - so it's great if this example runs on Linux as well to see it all working even if that requires a few nasty cfg blocks. Note that this is done withcfg!()
and regularif
blocks instead of attributes, such that this code lints and compiles on both Windows and Linux even if thevalidate_dxil()
codepath is never entered on the latter (and that way includes,let mut all_matches
etc don't need to be#[cfg(windows)]
'ed out either).Creating as draft because:
validate
name, but I think it's worth it being able to run this on Linux;Need to figure out why these shaders cause aDocumented and solved in utils: Propagate IncludeHandler file loading failures to DXC instead of a panic #27;DefaultIncludeHandler::load_source()
for the root directory of this crate (it should only use fules): this doesn't happen when compiling shaders to spir-v;For now I can just replace the
unwrap
withok()?
so that we return-2_147_024_894 // ERROR_FILE_NOT_FOUND / 0x80070002
to DXC; the handler is allowed to be fallible